<!DOCTYPE html>
<html lang="zh-CN">
<head>
        <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>智慧灌溉系统 | Smart Irrigation</title>
    <style>
        :root {
            --primary: #2e7d32;
            --primary-light: #81c784;
            --primary-dark: #1b5e20;
            --secondary: #388e3c;
            --accent: #4caf50;
            --text: #263238;
            --text-light: #607d8b;
            --bg: #f5fbf6;
            --card-bg: rgba(255, 255, 255, 0.85);
            --glass: rgba(255, 255, 255, 0.2);
            --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            --radius: 12px;
            --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        }

        @font-face {
            font-family: 'Inter';
            src: local('Inter'), url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', 'Microsoft YaHei', sans-serif;
            background-color: var(--bg);
            color: var(--text);
            line-height: 1.6;
            overflow-x: hidden;
        }

        .navbar {
            position: fixed;
            top: 0;
            width: 100%;
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            box-shadow: var(--shadow);
            z-index: 1000;
            padding: 1rem 2rem;
        }

        .navbar-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            max-width: 1280px;
            margin: 0 auto;
        }

        .logo {
            display: flex;
            align-items: center;
            color: white;
            text-decoration: none;
            font-weight: 600;
            font-size: 1.25rem;
        }

        .logo-icon {
            margin-right: 0.75rem;
            font-size: 1.5rem;
        }

        .nav-links {
            display: flex;
            list-style: none;
        }

        .nav-item {
            margin-left: 1.5rem;
            position: relative;
        }

        .nav-link {
            color: rgba(255, 255, 255, 0.9);
            text-decoration: none;
            font-weight: 500;
            padding: 0.5rem 0;
            transition: var(--transition);
            display: flex;
            align-items: center;
        }

        .nav-link:hover {
            color: white;
            transform: translateY(-2px);
        }

        .nav-link i {
            margin-right: 0.5rem;
            font-size: 1.1rem;
        }

        .dropdown {
            position: relative;
        }

        .dropdown-menu {
            position: absolute;
            top: 100%;
            right: 0;
            background: var(--card-bg);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: 0.75rem 0;
            min-width: 200px;
            opacity: 0;
            visibility: hidden;
            transform: translateY(10px);
            transition: var(--transition);
            z-index: 100;
        }

        .dropdown:hover .dropdown-menu {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .dropdown-item {
            display: block;
            padding: 0.75rem 1.5rem;
            color: var(--text);
            text-decoration: none;
            transition: var(--transition);
        }

        .dropdown-item:hover {
            background: rgba(0, 0, 0, 0.05);
            padding-left: 1.75rem;
            color: var(--primary);
        }

        .divider {
            height: 1px;
            background: rgba(0, 0, 0, 0.1);
            margin: 0.5rem 0;
        }

        .hamburger {
            display: none;
            background: none;
            border: none;
            color: white;
            font-size: 1.5rem;
            cursor: pointer;
        }

        .main-content {
            max-width: 1280px;
            margin: 6rem auto 3rem;
            padding: 0 2rem;
        }

        .hero {
            text-align: center;
            margin-bottom: 4rem;
            opacity: 0;
            transform: translateY(20px);
            animation: fadeInUp 0.6s forwards;
        }

        .hero-title {
            font-size: 2.5rem;
            font-weight: 700;
            color: var(--primary-dark);
            margin-bottom: 1.5rem;
            line-height: 1.2;
        }

        .hero-subtitle {
            font-size: 1.25rem;
            color: var(--text-light);
            max-width: 700px;
            margin: 0 auto 2rem;
        }

        .cta-button {
            display: inline-flex;
            align-items: center;
            background: linear-gradient(to right, var(--primary), var(--secondary));
            color: white;
            padding: 0.75rem 1.75rem;
            border-radius: 50px;
            text-decoration: none;
            font-weight: 500;
            box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
            transition: var(--transition);
        }

        .cta-button:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(46, 125, 50, 0.4);
        }

        .cta-button i {
            margin-left: 0.5rem;
        }

        .features {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
            margin-bottom: 4rem;
        }

        .feature-card {
            background: var(--card-bg);
            border-radius: var(--radius);
            padding: 2rem;
            box-shadow: var(--shadow);
            transition: var(--transition);
            opacity: 0;
            transform: translateY(20px);
        }

        .feature-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
        }

        .feature-icon {
            font-size: 2.5rem;
            color: var(--primary);
            margin-bottom: 1.5rem;
        }

        .feature-title {
            font-size: 1.25rem;
            font-weight: 600;
            margin-bottom: 1rem;
            color: var(--primary-dark);
        }

        .feature-desc {
            color: var(--text-light);
        }

        .dashboard {
            background: var(--card-bg);
            border-radius: var(--radius);
            padding: 2rem;
            box-shadow: var(--shadow);
            margin-bottom: 4rem;
            opacity: 0;
            transform: translateY(20px);
        }

        .dashboard-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 2rem;
        }

        .dashboard-title {
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--primary-dark);
        }

        .dashboard-controls {
            display: flex;
            gap: 1rem;
        }

        .control-button {
            background: var(--glass);
            border: 1px solid rgba(0, 0, 0, 0.1);
            border-radius: 6px;
            padding: 0.5rem 1rem;
            font-size: 0.875rem;
            cursor: pointer;
            transition: var(--transition);
        }

        .control-button:hover {
            background: rgba(0, 0, 0, 0.05);
        }

        .chart-container {
            height: 700px;
            background: white;
            border-radius: var(--radius);
            padding: 1rem;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        }

        .footer {
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            color: white;
            padding: 3rem 2rem;
            text-align: center;
        }

        .footer-content {
            max-width: 1280px;
            margin: 0 auto;
        }

        .footer-links {
            display: flex;
            justify-content: center;
            gap: 2rem;
            margin: 1.5rem 0;
            flex-wrap: wrap;
        }

        .footer-link {
            color: rgba(255, 255, 255, 0.8);
            text-decoration: none;
            transition: var(--transition);
        }

        .footer-link:hover {
            color: white;
        }

        .footer-copyright {
            color: rgba(255, 255, 255, 0.6);
            font-size: 0.875rem;
            margin-top: 2rem;
        }

        @keyframes fadeInUp {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @media (max-width: 768px) {
            .navbar-container {
                padding: 1rem;
            }

            .nav-links {
                position: fixed;
                top: 70px;
                left: 0;
                width: 100%;
                background: var(--primary-dark);
                flex-direction: column;
                align-items: center;
                padding: 1rem 0;
                clip-path: circle(0px at 90% -10%);
                transition: all 0.5s ease-out;
            }

            .nav-links.active {
                clip-path: circle(1000px at 90% -10%);
            }

            .nav-item {
                margin: 0.5rem 0;
            }

            .dropdown-menu {
                position: static;
                background: transparent;
                box-shadow: none;
                opacity: 1;
                visibility: visible;
                transform: none;
                display: none;
            }

            .dropdown:hover .dropdown-menu {
                display: block;
            }

            .dropdown-item {
                color: rgba(255, 255, 255, 0.8);
                padding: 0.5rem 2rem;
            }

            .dropdown-item:hover {
                color: white;
                background: transparent;
            }

            .hamburger {
                display: block;
            }

            .main-content {
                margin-top: 5rem;
                padding: 0 1rem;
            }

            .hero-title {
                font-size: 2rem;
            }

            .hero-subtitle {
                font-size: 1.1rem;
            }

            .features {
                grid-template-columns: 1fr;
            }
        }

        /* 卡片动画延迟 */
        .feature-card:nth-child(1) { animation: fadeInUp 0.6s 0.1s forwards; }
        .feature-card:nth-child(2) { animation: fadeInUp 0.6s 0.2s forwards; }
        .feature-card:nth-child(3) { animation: fadeInUp 0.6s 0.3s forwards; }
        .dashboard { animation: fadeInUp 0.6s 0.4s forwards; }

    </style>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}PCSE作物模型演示平台{% endblock %}</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    {% block head %}{% endblock %}
</head>
<body>
    <div class="container">
        <nav class="navbar">
            <div class="navbar-container">
                <a href="{{ url_for('index') }}" class="logo">
                    <i class="logo-icon fas fa-seedling"></i>
                    PCSE作物生长模型
                </a>
                <ul class="nav-links">
                    <li class="nav-item">
                        <a href="{{ url_for('index') }}" class="nav-link">
                            <i class="fas fa-home"></i> 首页
                        </a>
                    </li>
                    <li class="nav-item dropdown">
                        <a href="#" class="nav-link dropdown-toggle">
                            <i class="fas fa-tools"></i> 功能菜单
                        </a>
                        <div class="dropdown-menu">
                            <a href="{{ url_for('index') }}" class="dropdown-item">
                                <i class="fas fa-calculator"></i> 模拟计算
                            </a>
                            <a href="{{ url_for('Input_data') }}" class="dropdown-item">
                                <i class="fas fa-sliders-h"></i> 参数输入
                            </a>
                            <a href="{{ url_for('weather_input') }}" class="dropdown-item">
                                <i class="fas fa-cloud-sun"></i> 天气数据输入
                            </a>

                        </div>

                    </li>
                </ul>
            </div>
        </nav>
        
        <div class="main-content">
            {% block content %}{% endblock %}
        </div>
    </div>
    
    <script>
        // 汉堡菜单交互功能
        document.addEventListener('DOMContentLoaded', function() {
            const hamburger = document.createElement('button');
            hamburger.className = 'hamburger';
            hamburger.innerHTML = '<i class="fas fa-bars"></i>';
            
            const navbarContainer = document.querySelector('.navbar-container');
            const navLinks = document.querySelector('.nav-links');
            
            if (navbarContainer) {
                navbarContainer.appendChild(hamburger);
            }
            
            if (hamburger && navLinks) {
                hamburger.addEventListener('click', function() {
                    navLinks.classList.toggle('active');
                });
            }
            
            // 为下拉菜单添加触摸支持
            const dropdowns = document.querySelectorAll('.dropdown');
            dropdowns.forEach(dropdown => {
                dropdown.addEventListener('touchstart', function(e) {
                    e.preventDefault();
                    const menu = this.querySelector('.dropdown-menu');
                    if (menu) {
                        menu.style.display = menu.style.display === 'block' ? 'none' : 'block';
                    }
                });
            });
            
            // 点击页面其他区域关闭导航菜单
            document.addEventListener('click', function(e) {
                if (!e.target.closest('.navbar') && navLinks && navLinks.classList.contains('active')) {
                    navLinks.classList.remove('active');
                }
            });
        });
    </script>
    {% block scripts %}{% endblock %}
</body>
</html>